<?php defined('RUN_KATANA') or die('Restricted access'); ?>
<?php
print_r($fc);
if($fc->getForms())
{
	foreach($fc->getForms() as $item)
	{
		echo '<tr class="items">';
		echo '<td class="first center">'.$item->getId().'</td>';
		echo '<td>';
		echo 	'<input type="hidden" name="form_id[]" value="'.$item->getId().'" />';
		echo 	'<div style="display:none;">'.$item.'</div>';
		echo 	'<input class="select_list" type="checkbox" name="selected[]" value="'.$item->getId().'" /></td>';
		echo '<td><input class="medium" name="form_title[]" type="text" value="'.$item->getTitle().'" maxlength="80" /></td>';
		?>
		<td>
			<select name="form_method[]" class="small-m" onchange="submit();">
				<?php 
				echo '<option value="0" '.$txt->getIsSelectedHTML($item->getMethod(true), 0) .'>POST</option>';
				echo '<option value="1" '.$txt->getIsSelectedHTML($item->getMethod(true), 1) .'>GET</option>';
				?>
			</select>
		</td>
		<?php 
		echo '<td><input class="small-m" name="form_action[]" type="text" value="'.$item->getAction().'" maxlength="250" /></td>';
		echo '<td><input class="small-m" name="MailTo[]" type="text" value="'.$item->getMailTo().'" maxlength="250" /></td>';
		?>
		<td>
			<select name="form_human_check[]" class="small-m" onchange="submit();">
				<?php 
				echo '<option value="0" '.$txt->getIsSelectedHTML($item->getHumanCheck(), 0) .'>'.ucfirst($txt->getWord('no')).'</option>';
				echo '<option value="1" '.$txt->getIsSelectedHTML($item->getHumanCheck(), 1) .'>'.ucfirst($txt->getWord('yes')).'</option>';
				?>
			</select>
		</td>
		<td>
			<?php echo $commander->getActivationFieldsObjectAjax($item); ?>
			<input type="hidden" name="form_active[]" value="<?php echo $item->getActive(); ?>" />
		</td>
		<td class="center">
			<a href="?con=<?php echo $_REQUEST['con']; ?>&amp;form=<?php echo $item->getId(); ?>"><img title="<?php echo ucfirst($txt->getWord('edit')); ?>" class="icon command" src="<?php echo SYSICONS_URL; ?>configure_16.gif" /></a>
		</td>
		<td class="last center">
		<img title="<?php echo ucfirst($txt->getWord('delete').' '.$txt->getWord('form')); ?>" class="icon command form_delete" src="<?php echo SYSICONS_URL; ?>delete_16.gif" onclick="deleteDialog(<?php echo $item->getId(); ?>);" />
		</td>
		<?php
		echo '</tr>';
	}
}
else
{
	echo '<tr class="items">';
	echo '<td class="first center">0</td>';
	echo '<td class="center">';
	echo 	'<input class="select_list" type="checkbox" name="selected[]" value="0" /></td>';
	echo '<td>'.ucfirst($txt->getWord('empty')).'</td>';
	?>
	<td>&nbsp;</td>
	<td>&nbsp;</td>
    <td>&nbsp;</td>
	<td>&nbsp;</td>
	<td>&nbsp;</td>
	<td>&nbsp;</td>
	<td class="last center">&nbsp;</td>
	<?php
	echo '</tr>';
}
?>